package com.dingreading.cloud.subject.dto;

import com.mybatisflex.annotation.RelationOneToMany;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class SubjectLessonListDto implements Serializable {
    /**
     * 主键ID
     */
    private Long id;

    private String uid;

    /**
     * 主学科id
     */
    private Long subjectMainId;

    /**
     * 关联学科的id
     */
    private Long subjectId;

    /**
     * 课次名
     */
    private String lessonName;

    /**
     * 教学目的
     */
    private String teachAims;

    /**
     * 课次序号
     */
    private Integer lessonOrder;

    /**
     * 权限 0.无 1.有
     */
    private Long power;

    /**
     * 状态 0.禁用 1.启用
     */
    private Integer enabled;

    /**
     * 教案地址
     */
    private String teachPlanUrl;

    /**
     * 课件html地址
     */
    private String htmlUrl;

    /**
     * 资料地址
     */
    private String dataUrl;

    /**
     * 下载次数
     */
    private Integer downloadNum;

    /**
     * 资料下载 0.无 大于0.有
     */
    private Boolean downloadStatus;

    /**
     * 书籍信息
     */
    private String bookIsbn;
    private String bookImg;
    private String bookPress;

    /**
     * 视频集合
     */
    @RelationOneToMany(
            selfField = "uid",
            targetTable = "subject_lesson_video",
            targetField = "lessonUid",
            extraCondition = "(enabled = 1)"
    )
    private List<SubjectLessonVideoDto> videoList;

    /**
     * 教学视频是否上传
     */
    private Boolean teachVideoStatus = false;
    /**
     * 说课视频是否上传
     */
    private Boolean speakVideoStatus = false;

}
